﻿// TestCaseGeneratorUI
// (c)2007 Mark Bulmahn. mBulmahn@web.de
// License: GPL 2.0
// Project: TestCaseGenerator. http://www.codeplex.com/TestCaseGenerator

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TestCaseModel;

namespace TestCaseGenerator
{
    public partial class FrmSettings : Form
    {
        public FrmSettings()
        {
            InitializeComponent();
            cboGenerator.SelectedIndex = Properties.Settings.Default.GeneratorToUse;
        }

        private void butOK_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.GeneratorToUse = cboGenerator.SelectedIndex;
            Properties.Settings.Default.Save();
            TestCaseModel.GlobalSettings.GeneratorToUse = (GlobalSettings.TcGenerator)
                Properties.Settings.Default.GeneratorToUse;
            this.Close();
        }

        private void butCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
